const utahaPC = require('../main')

let main = new utahaPC()
main.createChild(
    [
        {
            name: 'utaha0',
            command: 'node',
            file: './b.js',
            parameters: ['utaha0','Aki Megumi','Aki Utaha'],
            options: {
                stdio: 'inherit'
            }
        },
        {
            name: 'utaha1',
            file: './a.js',
            parameters: ['Kasumigaoka Utaha','Aki Megumi','Aki Utaha'],
        },
        {
            name: 'utaha1',
            file: './b.js',
            parameters: ['utaha1','Aki Megumi','Aki Utaha'],
            options: {
                stdio: 'ignore'
            }
        },
        {
            name: 'utaha3',
            command: 'date',
            parameters: [],
        },
        {
            name: 'utaha4',
            command: 'date',
            options: {
                stdio: 'inherit'
            }
        },
        {
            name: '',
            file: './e.js'
        },
        {
            name: 'megumi',
            file: './e.js',
            restart: 'count'
        },
        {
            name: 'Eriri0',
            file: './a.js',
            restart: 'none'
        },
        {
            name: 'Eriri1',
            file: './a.js',
            restart: 'count',
            restartCount: 5
        },
        {
            name: 'Aki Utaha0',
            command: 'node',
            file: './c.js',
            parameters: ['Aki Utaha0','Aki Megumi','Aki Utaha'],
            options: {
                stdio: 'inherit'
            }
        },
        {
            name: 'Aki Utaha1',
            command: 'node',
            file: './d.js',
            parameters: ['Aki Utaha1','Aki Megumi','Aki Utaha'],
            options: {
                stdio: 'inherit'
            }
        },
        
])


main.showChildProcess()

setTimeout(() => {
    main.killAllChildren()
},4000)
setTimeout(() => {
    main.showChildProcess()
},6500)